package com.ny.mapper;

import com.ny.entity.DeviceNew;
import com.ny.repository.DeviceNewRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

@Service
public class DeviceService {
    @Autowired
    private DeviceNewRepository deviceRepository;

    // 查询所有设备
    public List<DeviceNew> getAllDevices() {
        return deviceRepository.findAll();
    }
}